﻿workspace "Hazel"
	architecture "x64"
	startproject "Sandbox"
	configurations
	{
		"Debug",
		"Release",
		"Dist"
	}

outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"

project "Hazel"
	location "Hazel"
	kind "SharedLib"
	language "C++"
--	staticruntime "on"
	targetdir ("bin/" .. outputdir .. "/%{prj.name}")
	objdir ("bin-int/" .. outputdir .. "/%{prj.name}")
--	pchheader "hzpch.h"
--	pchsource "Hazel/src/hzpch.cpp"
	files
	{
		"%{prj.name}/src/**.h",
		"%{prj.name}/src/**.cpp",
--		"%{prj.name}/vendor/stb_image/**.h",
--		"%{prj.name}/vendor/stb_image/**.cpp",
--		"%{prj.name}/vendor/glm/glm/**.hpp",
--		"%{prj.name}/vendor/glm/glm/**.inl"
	}
	includedirs
	{
--		"%{prj.name}/src",
		"%{prj.name}/vendor/spdlog/include",
--		"%{prj.name}/vendor/GLFW/include",
--		"%{prj.name}/vendor/Glad/include",
--		"%{prj.name}/vendor/imgui",
--		"%{prj.name}/vendor/glm",
--		"%{prj.name}/vendor/stb_image"
	}
	links
	{
--		"GLFW",
--		"Glad",
--		"ImGui",
--		"opengl32.lib"
	}
	filter "system:windows"
		cppdialect "C++17"
		systemversion "latest"
		defines
		{
			"HZ_PLATFORM_WINDOWS",
			"HZ_BUILD_DLL",
--			"GLFW_INCLUDE_NONE"
		}
		postbuildcommands
		{
			("{COPY} %{cfg.buildtarget.relpath} ../bin/" .. outputdir .. "/Sandbox")
		}
	filter "configurations:Debug"
		defines "HZ_DEBUG"
		runtime "Debug"
		symbols "on"
	filter "configurations:Release"
		defines "HZ_RELEASE"
		runtime "Release"
		optimize "on"
	filter "configurations:Dist"
		defines "HZ_DIST"
		runtime "Release"
		optimize "on"




project "Sandbox"
	location "Sandbox"
	kind "ConsoleApp"
	language "C++"
--	staticruntime "on"
	targetdir ("bin/" .. outputdir .. "/%{prj.name}")
	objdir ("bin-int/" .. outputdir .. "/%{prj.name}")
--	pchheader "hzpch.h"
--	pchsource "Hazel/src/hzpch.cpp"
	files
	{
		"%{prj.name}/src/**.h",
		"%{prj.name}/src/**.cpp",
--		"%{prj.name}/vendor/stb_image/**.h",
--		"%{prj.name}/vendor/stb_image/**.cpp",
--		"%{prj.name}/vendor/glm/glm/**.hpp",
--		"%{prj.name}/vendor/glm/glm/**.inl"
	}
	includedirs
	{
--		"%{prj.name}/src",
--		"%{prj.name}/vendor/spdlog/include",
		"Hazel/vendor/spdlog/include",
		"Hazel/src",
--		"%{prj.name}/vendor/GLFW/include",
--		"%{prj.name}/vendor/Glad/include",
--		"%{prj.name}/vendor/imgui",
--		"%{prj.name}/vendor/glm",
--		"%{prj.name}/vendor/stb_image"
	}
	links
	{
		"Hazel",
--		"GLFW",
--		"Glad",
--		"ImGui",
--		"opengl32.lib"
	}
	filter "system:windows"
		cppdialect "C++17"
		systemversion "latest"
		defines
		{
			"HZ_PLATFORM_WINDOWS",
--			"GLFW_INCLUDE_NONE"
		}
		
	filter "configurations:Debug"
		defines "HZ_DEBUG"
		runtime "Debug"
		symbols "on"
	filter "configurations:Release"
		defines "HZ_RELEASE"
		runtime "Release"
		optimize "on"
	filter "configurations:Dist"
		defines "HZ_DIST"
		runtime "Release"
		optimize "on"


